namespace BLGenerator.BusinessLogic
{
    public class Entity
    {
        #region Private fields

        private string _entityName;
        private string _tableName;
        private bool _isGenerated;
        private readonly FieldCollection _fieldCollection = new FieldCollection();
        private readonly FieldCollection _primaryFields = new FieldCollection();
        private readonly Project _project; 

        #endregion

        #region Properties

        public string EntityName
        {
            get { return _entityName; }
            set { _entityName = value; }
        }

        public string TableName
        {
            get { return _tableName; }
            set { _tableName = value; }
        }

        public bool IsGenerated
        {
            get { return _isGenerated; }
            set { _isGenerated = value; }
        }

        public FieldCollection FieldCollection { get { return _fieldCollection; } }
        public FieldCollection PrimaryFields { get { return _primaryFields; } }

        public Project Project { get { return _project; } }

        #endregion

        public Entity(string entityName, string tableName, bool isGenerated, Project project)
        {
            _entityName = entityName;
            _tableName = tableName;
            _isGenerated = isGenerated;
            _project = project;
        }

    }
}